﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace ET.ScoreTeacherClient.Views
{
    /// <summary>
    /// TestPaperHistory.xaml 的交互逻辑
    /// </summary>
    public partial class TestPaperHistory : UserControl
    {
        public TestPaperHistory()
        {
            InitializeComponent();
        }

        private void StackPanel_Click(object sender, RoutedEventArgs e)
        {
            StackPanel stackPanel = sender as StackPanel;
            ContentPresenter cp = stackPanel.TemplatedParent as ContentPresenter;
        }

        private void BtnSearch_Click(object sender, RoutedEventArgs e)
        {
            //this.dgGroup.ItemsSource = ExamResultsDAL.GetExamResults(dateStart.SelectedDate.Value.Date, dateEnd.SelectedDate.Value.AddDays(1).Date, this.txtPaperName.Text.Trim(), this.txtUserNumber.Text.Trim());
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            dateStart.SelectedDate = DateTime.Now;
            dateEnd.SelectedDate = DateTime.Now;
            //this.dgGroup.ItemsSource = ExamResultsDAL.GetExamResults(dateStart.SelectedDate.Value.Date, dateEnd.SelectedDate.Value.AddDays(1).Date);
        }

        private void DomainGrid_LoadingRow(object sender, DataGridRowEventArgs e)
        {
            //ExamResultsModel row = e.Row.Item as ExamResultsModel;
            //e.Row.Header = e.Row.GetIndex() + 1;
        }
    }

    public class PracticeScore
    {
        public string playerNumber { get; set; }
        public string practicalTestPaper { get; set; }
        /// <summary>
        /// 实操场景一实际开始时间
        /// </summary>
        public DateTime scene1BeginTime { get; set; }
        /// <summary>
        /// 实操场景一实际结束时间
        /// </summary>
        public DateTime scene1EndTime { get; set; }
        /// <summary>
        /// 实操场景二实际开始时间
        /// </summary>
        public DateTime scene2BeginTime { get; set; }
        /// <summary>
        /// 实操场景二实际结束时间
        /// </summary>
        public DateTime scene2EndTime { get; set; }
        public decimal scene1Score { get; set; }
        public decimal scene2Score { get; set; }
    }

    public class ScoreResult
    {
        public string success { get; set; }
        public int code { get; set; }
        public string message { get; set; }
        public string result { get; set; }
    }
}
